// server/createStore.js 创建 store
import { applyMiddleware, createStore } from 'redux'
import thunk from 'redux-thunk'
import reducer from '../share/store/reducers'

// 要将创建 store 放在函数中 因为是在接收到请求的时候再创建 store
export default () => createStore(reducer, {}, applyMiddleware(thunk))